import os
Import ("*")

lib_name = "bs_hdf5_storage"
tar_name = "bs_hdf5_storage"


env = custom_env.Clone ()
env.Append (CPPPATH = [
    includes["bs_bos_core_base"],
    includes["bs_matrix"]
    ] 
    + includes["kernel"]
    + includes["bs_hdf5_storage"]
    )

libs = ["blue_sky", 
     "bs_bos_core_base", 
     "bs_matrix"
     ]

boost_libs = ["boost_date_time-mt"]

if (build_kind == "debug") :
    env.AppendUnique (LIBS = list_suffix (libs, "_d") + list_suffix (boost_libs, "-d"))
    lib_name += "_d"
elif (build_kind == "release") :
    env.AppendUnique (LIBS = libs + boost_libs)

env.AppendUnique (
        LIBPATH = lib_path["hdf5"],
        CPPDEFINES = defines["bs_hdf5_storage"],
        LIBS = ["hdf5"]
        )

bs_hdf5_storage = env.SharedLibrary (target = os.path.join (tar_exe_plugin_dir, lib_name), source = files (["."]).sources)

env.Alias (tar_name, bs_hdf5_storage)
Export ("bs_hdf5_storage")

if (env["install"] == 1) :
    inst_tar = env.Install ("$plugins_prefix", bs_hdf5_storage)
    env.Alias (tar_name, inst_tar)




